package com.example.chinesenation.Response;

/**
 * @author sakuraFallingDown
 * @version 1.0
 * @date 2021/1/18 14:16
 */
public enum ResultType {
    SUCCESS(20000,"请求成功"),

    ERROR(20001,"未知错误"),
    UIDERROR(20008,"用户名必须是11位"),
    LOGINERROR(20002,"用户名或密码错误"),
    UNLOGINERROR(20002,"用户未登录"),
    ACCESSERROR(20003,"权限不足"),

    REMOTEERROR(20004,"远程调用操作"),

    REPERROR(20005,"重复操作"),

    TOKENEXPIRE(20005,"token过期"),
    TOKENERROR(20006,"token解析异常"),
    TOKENNULL(20007,"token为空"),

    REIDSERROR(20009,"Redis链接异常"),
    ElasticSearchUpdatePageViewError(20010,"ElasticSearch更新文章阅读量异常"),
    ElasticSearchERROR(20011,"ElasticSearch查询异常"),

    MapProvinceCanNotNull(20012,"地图模块查询省份名不能为空"),
    MapCityCanNotNull(20012,"地图模块查询城市名不能为空"),


    NOTEXITS(21000,"数据库中不存在指定内容的数据");


    private int code;
    private String msg;

    ResultType(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
